Contents

Click on the green text below to jump to sections of the tutorial after you have read the introduction below.

How to use this Tutorial

What does SHERLOCK do?

Getting Started

Selection Filters

Bookmarks

Search

Configuration

Exit the Tutorial

Introduction

This tutorial provides exercises for getting to know SHERLOCK.  It allows you to practice using SHERLOCK.  The SHERLOCK window and this tutorial window have been sized so you can see both simultaneously.

What we'll do.

You will practice on four text files that came with SHERLOCK.  These files have specific text situations setup for demonstrating features by which you will learn how to use SHERLOCK. The four text files that came with SHERLOCK are AUTOEXEC.TU1, AUTOEXEC.TU2, AUTOEXEC.TU3, and AUTOEXEC.TU4. They should be in the same subdirectory as SHERLOCK.

How to use this Tutorial


How to use this Tutorial

Select The Active Window

Scroll through the tutorial instructions. When you intend to either click on something in the SHERLOCK program window or press a SHERLOCK function key after scrolling or clicking in this Tutorial window, first click anywhere on the background of the SHERLOCK program window. This will notify your computer to make the SHERLOCK program window the active window. The top line of the active window is highlighted. Otherwise nothing may happen on the first click, or pop down windows will open then quickly close, or function keys will not work.

Some SHERLOCK dialog boxes will pop up over this tutorial script. You can move the dialog box out of the way to read this tutorial by clicking on the title bar at the top of the dialog box and dragging it. Or, you can scroll this text from under the dialog box, but then the dialog box will go behind the tutorial. Click on any visible part of the dialog box to bring it forward.

At the end of each section is a hotspot to click on to jump to the next section and one to return to the main menu. It is best to go through the sections of the tutorial in sequence.

Now click on the green text (hot spot) below to continue.

What does SHERLOCK do?

Return to the Main Menu


What does SHERLOCK do?

SHERLOCK compares two ASCII files line by line and indicates when text in corresponding lines does not match.  You may then scroll either or both files past the mismatch to put them in sync and then continue.  SHERLOCK contains features for searching, jumping around the files, restarting, and copying lines to a printer.  SHERLOCK does not write to either file.

SHERLOCK displays multiple lines of each file in separate windows. When the current lines in each window do not match, the color of the text changes. If SHERLOCK was scanning, the scan would stop.

The file name is displayed in the top frame of the window. The line number of the current line is displayed to the left of the window.

SHERLOCK is designed as a tool for programmers, writers and workstation support personnel.  It is ideal for comparing program source files, AUTOEXEC.BAT, CONFIG.SYS, and text documents.

Getting Started

Return to the Main Menu


Getting Started

Opening the Files

First open two files to compare. We will open AUTOEXEC.TU1 and AUTOEXEC.TU2. Remember to click anywhere in the SHERLOCK window to switch to it. Click on "Files" in the SHERLOCK menu bar, or press ALT  F. Select Open File 1

In the Open File 1 window, use the standard Windows procedures to navigate to the disk and subdirectory where you installed SHERLOCK.  There you will find four AUTOEXEC files to be used as test data. Select AUTOEXEC.TU1

Click on "Files" in the SHERLOCK menu bar again and select Open File 2. Select AUTOEXEC.TU2

The first line of each file is now in the middle line of a window. This is referred to as the "current line."

Since both lines match, the color of the text is blue.

Missing Text

Click the Scan button. Both windows scroll to line 5. The current lines do not match and the color of the text is red to indicate a mismatch. The line in File 1 has a /S at the end and the corresponding line in File 2 does not.

Line Missing

Click the Scan button again. Both windows scroll to line 11. The current lines do not match and the color of the text is red to indicate a mismatch.

Control Buttons

The control buttons are to the right of the text windows.  There is a set for the top window, a set for the bottom window, and a third set for both windows. The function of each button is described in the SHERLOCK Help.

To identify the function of a SHERLOCK control button that is not marked as the Home and End buttons are, put the cursor on a button and click the right mouse button. A brief identification phrase will be displayed above the top Home button. Try it.

Click and hold the right mouse button on the second small control button directly below the top Home button. The identification phrase is Scan Down Top File. File 1 will be scanned until it finds a match with the current line in File 2, or until it reaches the end of the file. It will stop at line 12 because it matches line 11 in File 2.

Notice that the radio button below the Scan button is set for Scan Down.

Click once on the small control button marked D to the left of the scan button. This advances both files one line. The button above it marked U will move both files back one line. Click the U control button once.

Notice that the radio button below the Scan button is now set for Scan Up because that is the direction we were last going in. To continue scanning down the file, click on the Scan Down radio button to set it.

Click the large Scan button and the scan will continue to the end of the file.

The radio button below the Scan button is now set for Scan Up. You can click on these radio buttons to reverse the direction of the dual scan.

Selection Filters

Return to the Main Menu


Selection Filters

Spaces and Tabs

Click Open File 2 from the File pull down menu. Select AUTOEXEC.TU3

Click and hold the right mouse button on the button marked with a T. Read its function in the message above. Click it to position both files to line 1.

Click on the Scan button.

The scan stops at line 9 where the curent lines do not match because there are leading spaces in line 9 of File 2.

Click on "Filter" in the SHERLOCK menu bar, or press ALT  I, to open the filter dialog box.

Click the box before Ignore Leading Spaces to insert an X. Notice the color of the text in the current line changes to blue to indicate a match. Click it again and the text color returns to red. Click it again to leave an X in the box, then click Okay to close the filter window.

Click on the Scan button again.

The scan stops at line 13 because there are imbedded spaces in this line in File 2.

Repeat the above procedure for accessing the Filter window and check the Ignore All Spaces box. The text color of the current line changes to blue. Click Okay.

Click on the Scan button again.

The scan stops at line 20 because there is a tab in the beginning of this line in File 2. The tab is displayed as a graphic character.

Access the filter window and click the Ignore All Tabs box. Click Okay.

Click scan and the rest of the file matches.

Lower Case

Click Open File 2. Select AUTOEXEC.TU4

Click on the button marked with a T to position both files to line 1.

Click on the Scan button.

The scan stops at line 5 because that line is upper case in File 1 and lower case in File 2.

Access the filter window and check the Case Sensitive box to remove the X.

Click scan and the rest of the file matches.

Bookmarks

Return to the Main Menu


Bookmarks

Click on "Files" in the SHERLOCK menu bar, or press ALT  F. The four files you have opened previously are listed below Exit on the file menu. Click on AUTOEXEC.TU2. The Opening A New File dialog box appears. Click the Bottom radio button, then Okay. AUTOEXEC.TU1 should already be in the top window for this section.

Use the top slider bar to position line 5 as the current line, i.e. the center line.

Click on "Bookmark" in the SHERLOCK menu bar, or press ALT  K, to drop down the Bookmark menu.

Select Set Bookmark File 1 to open the bookmark dialog box. Read the notes at bottom of the box.

The first 12 characters of line 5 are in the input box for identification of the line. You may insert any name you wish to identify this bookmark. Click Okay.

Click on the button marked with a T to position both files to line 1.

Click on "Bookmark" in the SHERLOCK menu bar, or press ALT  K, to drop down the Bookmark menu.

Select Go To.. to open the Go to a Bookmark dialog box. Click on the bookmark you entered to highlight it, then click Okay. Line 5 will be placed in the current line.

Swap Windows

Click on "Files" in the SHERLOCK menu bar. Select Swap Windows. This moves the file in the top window to the bottom window and vice versa. Any bookmarks you have set are also moved with the files. Execute a Swap Windows again so AUTOEXEC.TU1 is in the top window.

Go to a Line

You can go directly to any line in a file. Click on "Go To Line" in the SHERLOCK menu bar, or press ALT  G, to drop down the Go To Line menu. Select Go to Line in Both. The Input Line Number dialog box opens. Enter 15 and press return. The current line in both files will be set to 15.

Search

Return to the Main Menu


Search

AUTOEXEC.TU1 and AUTOEXEC.TU2 should be in the top and bottom windows respectively. Click on the button marked with a T to position both files to line 1.

Click on "Search" in the SHERLOCK menu bar, or press ALT  S, to drop down the Search menu.

Select Search File 1.  The Search Input dialog box opens.  Enter DOS and click Okay.  The word DOS is found in line 7. A message is displayed above the control buttons indicating the search was successful.

Click on "Search" in the SHERLOCK menu bar again and select Search File 1. This time the Search Input dialog box does not open because it already has text to search for and finds it in line 11.

Press F3 to search File 1 again and DOS is found in line 12. Press F3 again to stop at line 22. Press F3 again and the Message from Search File 1 dialog box pops up to say it could not find DOS when it searched to the end of File 1. Click Okay or press Return. Search always starts looking on the line after the current line.

Press F4 to search File 2 and DOS is found in line 7 of File 2.

Click on "Search" in the SHERLOCK menu bar again. Note the menu item, Display Buttons, at the bottom of the list. Also notice that in the buttons group there are two small buttons between the Home and End buttons for both files.

Click on Display Buttons. Two more buttons appear between the Home and End buttons.  These are to initiate a search with the mouse. They also add an additional capability - to search up from the current line toward the beginning of the file.

Click on the top search button for File 1. It finds DOS in line 12. Click the lower search button for File 1, twice. First it finds a match in line 22, then it displays the Message from Search File 1 dialog box.

Configuration

Return to the Main Menu


Configuration

Click on "Configuration", or press ALT O, in the SHERLOCK menu bar to drop down the Configuration menu. The six items are self explanatory. You would check Display Off During Scan to speed up the scan process.

Click on Number of Text Lines to select an odd number of text lines for each window from 1 to 11.  Click on 7.

Drop down the Configuration menu again. The item Set Text Line Width allows you to select a relative width of 20 to 70 characters. Actual number of characters displayed depends on the font. It is set for 30 for this tutorial. Do not change it while in this tutorial because it would increase the SHERLOCK window width and interfere with the tutorial instructions.

Click on the next menu item, Lines Under Text, and watch what happens. Click again to remove the lines if you do not like them.

The next two items in the Configuration menu allow you to reconfigure the appearance of SHERLOCK. These use the standard Windows color and font routines. The font size has been limited to what would fit in the lines. The initial font is 10 point MS Sans Serif bold.

When you set the text line width, SHERLOCK moves the control buttons a little to the right of the text windows. It also reconfigures the size of the whole SHERLOCK window so that all the top line menu items fit on one line.

You can resize the SHERLOCK window two ways using standard Windows methods. But do not do it while in this tutorial. The first method is to click on the small box in the upper right hand corner of the SHERLOCK window to make it fill the whole screen.  Click again and it returns to it's original size.

The second method lets you make the window any size you want. Put the cursor on the left or bottom edge of the SHERLOCK window until it becomes a two headed arrow. Press and hold the left mouse button and drag the edge where you desire. You may want to move the right edge over to just right of the buttons when you have a narrow line width.

When you quit SHERLOCK, all of the configuration parameters are saved. However, most of the parameters you set in this tutorial will not be saved when you exit the tutorial.

This is the last section of the SHERLOCK tutorial. Be sure to look at the SHERLOCK Help file that is accessed from the Help menu. The Help file makes it easy to access descriptions of the menu items and the control buttons.

Return to the Main Menu

Exit the  Tutorial


Current Line

The current line is the line in the center of each window and is highlighted. The current line in the top window is compared to the current line in the bottom window to determine if the lines match.


Exit the Tutorial

After you Exit the Tutorial you should restore the SHERLOCK window to what it was before it was squeezed to make room for the Tutorial window.

To restore the SHERLOCK window to its previous size perform, these steps AFTER you end the tutorial.

1.  Click on Help in the SHERLOCK menu bar.

2.  Select Reset SHERLOCK After Tutorial

End the Tutorial

Return to the Main Menu